<?php
/***************************************************************************
 *
 *   copyright            : (C) 2011 Winds of Storm
 *
 *   $Id: help.php 155 2011-06-20 16:01:58Z stormerider $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

require_once("config.php");
$body['class']	= 'row2';
$header         = '';
$full_header	= 1;
require_once($libdir . "init." . $phpEx);
require_once($libdir . "chat_functs." . $phpEx);

$template = new Template($config['TPL_DIR']);
$template->set_filenames(array('body' => 'help_body.tpl'));

$cmds	= getHelpCommands();
$template->assign_block_vars('help_type', array(
	'TYPE'		=> 'Command',
	'ANCHOR'	=> 'cmd'
));
foreach ($cmds as $cmd) {
	$template->assign_block_vars('help_type.entry', array(
		'USAGE'		=> $cmd[0],
		'DESCRIPTION'	=> $cmd[1]
	));
}

$filters	= getHelpFilters();
$template->assign_block_vars('help_type', array(
	'TYPE'		=> 'Filter',
	'ANCHOR'	=> 'fltr'
));
foreach ($filters as $filter) {
	$template->assign_block_vars('help_type.entry', array(
		'USAGE'		=> $filter[0],
		'DESCRIPTION'	=> $filter[1]
	));
}

$template->pparse('body');
